import type { AjaxPagingResult } from '@/types'
import type { QueryParams, ListItem, SaveParams } from '@/views/equipment-inspection/type'

const controller = getAjaxBaseUrl('/equipmentTour', '/energy')

/** 分页查询设备巡检信息列表 */
export function queryEquipmentTourByPage(params: QueryParams) {
  return post<AjaxPagingResult<ListItem[]>>(`${controller}/list`, params)
}

/** 保存设备巡检信息 */
export function saveEquipmentTour(params: SaveParams) {
  return post(`${controller}/save`, params)
}

/** 删除设备巡检信息 */
export function deleteEquipmentTour(id: number) {
  return get(`${controller}/del`, { id })
}
